package mc

import (
	"gitee.com/dreamwood/ez-go/db/mgo"
)

const (
	ChangeLogEventNew           = "wms.ChangeLogNew"
	ChangeLogEventBeforeCreate  = "wms.ChangeLogBeforeCreate"
	ChangeLogEventBeforeUpdate  = "wms.ChangeLogBeforeUpdate"
	ChangeLogEventBeforeSave    = "wms.ChangeLogBeforeCreate wms.ChangeLogBeforeUpdate"
	ChangeLogEventAfterCreate   = "wms.ChangeLogAfterCreate"
	ChangeLogEventAfterUpdate   = "wms.ChangeLogAfterUpdate"
	ChangeLogEventAfterSave     = "wms.ChangeLogAfterCreate wms.ChangeLogAfterUpdate"
	ChangeLogEventDelete        = "wms.ChangeLogDelete"
	ChangeLogAccessControlEvent = "wms.ChangeLogAccessControl"
)

func GetChangeLogConfig() *mgo.DocConfig {
	return ChangeLog_Config
}

var ChangeLog_Config *mgo.DocConfig

func init() {
	ChangeLog_Config = NewChangeLogConfig()
}
func NewChangeLogConfig() *mgo.DocConfig {
	return &mgo.DocConfig{
		ContainerKey: "wms.ChangeLog",
		Fields: []string{
			"itemId", "ioType", "state",
		},
		RelationFields:  []string{},
		RelationConfigs: map[string]*mgo.DocRelation{},
		FieldFilter: map[string]*mgo.DocFieldFilter{
			"default": {
				Select: []string{},
				Omit:   []string{},
			},
		},
	}
}
